3.1.16 \(\int (g x)^m (a+b x^n+c x^{2 n})^p (a (1+m)+b (1+m+n+n p) x^n+c (1+m+2 n (1+p)) x^{2 n}) \, dx\) [16]

Optimal. Leaf size=29 \[ \frac {(g x)^{1+m} \left (a+b x^n+c x^{2 n}\right )^{1+p}}{g} \]

[Out]

(g*x)^(1+m)*(a+b*x^n+c*x^(2*n))^(1+p)/g

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 56, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.018, Rules used = {1761} \begin {gather*} \frac {(g x)^{m+1} \left (a+b x^n+c x^{2 n}\right )^{p+1}}{g} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(g*x)^m*(a + b*x^n + c*x^(2*n))^p*(a*(1 + m) + b*(1 + m + n + n*p)*x^n + c*(1 + m + 2*n*(1 + p))*x^(2*n)),
x]

[Out]

((g*x)^(1 + m)*(a + b*x^n + c*x^(2*n))^(1 + p))/g

Rule 1761

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_.) + (f_.)*(x
_)^(n2_.)), x_Symbol] :> Simp[d*(g*x)^(m + 1)*((a + b*x^n + c*x^(2*n))^(p + 1)/(a*g*(m + 1))), x] /; FreeQ[{a,
 b, c, d, e, f, g, m, n, p}, x] && EqQ[n2, 2*n] && EqQ[a*e*(m + 1) - b*d*(m + n*(p + 1) + 1), 0] && EqQ[a*f*(m
 + 1) - c*d*(m + 2*n*(p + 1) + 1), 0] && NeQ[m, -1]

Rubi steps

\begin {align*} \int (g x)^m \left (a+b x^n+c x^{2 n}\right )^p \left (a (1+m)+b (1+m+n+n p) x^n+c (1+m+2 n (1+p)) x^{2 n}\right ) \, dx &=\frac {(g x)^{1+m} \left (a+b x^n+c x^{2 n}\right )^{1+p}}{g}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.88, size = 24, normalized size = 0.83 \begin {gather*} x (g x)^m \left (a+x^n \left (b+c x^n\right )\right )^{1+p} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(g*x)^m*(a + b*x^n + c*x^(2*n))^p*(a*(1 + m) + b*(1 + m + n + n*p)*x^n + c*(1 + m + 2*n*(1 + p))*x^(
2*n)),x]

[Out]

x*(g*x)^m*(a + x^n*(b + c*x^n))^(1 + p)

________________________________________________________________________________________

Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \left (g x \right )^{m} \left (a +b \,x^{n}+c \,x^{2 n}\right )^{p} \left (a \left (1+m \right )+b \left (n p +m +n +1\right ) x^{n}+c \left (1+m +2 n \left (1+p \right )\right ) x^{2 n}\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x)^m*(a+b*x^n+c*x^(2*n))^p*(a*(1+m)+b*(n*p+m+n+1)*x^n+c*(1+m+2*n*(1+p))*x^(2*n)),x)

[Out]

int((g*x)^m*(a+b*x^n+c*x^(2*n))^p*(a*(1+m)+b*(n*p+m+n+1)*x^n+c*(1+m+2*n*(1+p))*x^(2*n)),x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (29) = 58\).
time = 0.35, size = 60, normalized size = 2.07 \begin {gather*} {\left (a g^{m} x x^{m} + c g^{m} x e^{\left (m \log \left (x\right ) + 2 \, n \log \left (x\right )\right )} + b g^{m} x e^{\left (m \log \left (x\right ) + n \log \left (x\right )\right )}\right )} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x)^m*(a+b*x^n+c*x^(2*n))^p*(a*(1+m)+b*(n*p+m+n+1)*x^n+c*(1+m+2*n*(1+p))*x^(2*n)),x, algorithm="ma
xima")

[Out]

(a*g^m*x*x^m + c*g^m*x*e^(m*log(x) + 2*n*log(x)) + b*g^m*x*e^(m*log(x) + n*log(x)))*(c*x^(2*n) + b*x^n + a)^p

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 65 vs. \(2 (29) = 58\).
time = 0.35, size = 65, normalized size = 2.24 \begin {gather*} {\left (c x x^{2 \, n} e^{\left (m \log \left (g\right ) + m \log \left (x\right )\right )} + b x x^{n} e^{\left (m \log \left (g\right ) + m \log \left (x\right )\right )} + a x e^{\left (m \log \left (g\right ) + m \log \left (x\right )\right )}\right )} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x)^m*(a+b*x^n+c*x^(2*n))^p*(a*(1+m)+b*(n*p+m+n+1)*x^n+c*(1+m+2*n*(1+p))*x^(2*n)),x, algorithm="fr
icas")

[Out]

(c*x*x^(2*n)*e^(m*log(g) + m*log(x)) + b*x*x^n*e^(m*log(g) + m*log(x)) + a*x*e^(m*log(g) + m*log(x)))*(c*x^(2*
n) + b*x^n + a)^p

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x)**m*(a+b*x**n+c*x**(2*n))**p*(a*(1+m)+b*(n*p+m+n+1)*x**n+c*(1+m+2*n*(1+p))*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 96 vs. \(2 (29) = 58\).
time = 3.62, size = 96, normalized size = 3.31 \begin {gather*} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} c x x^{2 \, n} e^{\left (m \log \left (g\right ) + m \log \left (x\right )\right )} + {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} b x x^{n} e^{\left (m \log \left (g\right ) + m \log \left (x\right )\right )} + {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} a x e^{\left (m \log \left (g\right ) + m \log \left (x\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x)^m*(a+b*x^n+c*x^(2*n))^p*(a*(1+m)+b*(n*p+m+n+1)*x^n+c*(1+m+2*n*(1+p))*x^(2*n)),x, algorithm="gi
ac")

[Out]

(c*x^(2*n) + b*x^n + a)^p*c*x*x^(2*n)*e^(m*log(g) + m*log(x)) + (c*x^(2*n) + b*x^n + a)^p*b*x*x^n*e^(m*log(g)
+ m*log(x)) + (c*x^(2*n) + b*x^n + a)^p*a*x*e^(m*log(g) + m*log(x))

________________________________________________________________________________________

Mupad [B]
time = 2.25, size = 50, normalized size = 1.72 \begin {gather*} \left (a\,x\,{\left (g\,x\right )}^m+b\,x\,x^n\,{\left (g\,x\right )}^m+c\,x\,x^{2\,n}\,{\left (g\,x\right )}^m\right )\,{\left (a+b\,x^n+c\,x^{2\,n}\right )}^p \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x)^m*(a + b*x^n + c*x^(2*n))^p*(a*(m + 1) + b*x^n*(m + n + n*p + 1) + c*x^(2*n)*(m + 2*n*(p + 1) + 1)),
x)

[Out]

(a*x*(g*x)^m + b*x*x^n*(g*x)^m + c*x*x^(2*n)*(g*x)^m)*(a + b*x^n + c*x^(2*n))^p

________________________________________________________________________________________